﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;


namespace ULinq.GenTools
{
    /// <summary>
    /// Registers the project with COM.
    /// </summary>
    [RunInstaller(true)]
    [System.ComponentModel.DesignerCategory("Code")]
    public partial class ProjectInstaller : Installer
    {

        public override void Install(IDictionary stateSaver)
        {
            base.Install(stateSaver);
            new RegistrationServices().RegisterAssembly(
                Assembly.GetExecutingAssembly(),
                AssemblyRegistrationFlags.SetCodeBase);
        }

        public override void Rollback(IDictionary savedState)
        {
            base.Rollback(savedState);
            new RegistrationServices().UnregisterAssembly(
                Assembly.GetExecutingAssembly());
        }

        public override void Uninstall(IDictionary savedState)
        {
            base.Uninstall(savedState);
            new RegistrationServices().UnregisterAssembly(
                Assembly.GetExecutingAssembly());
        }

    }
}
